<template>
  <div class="ipc">
    <el-card class="box-card">
      <el-row>
        <el-button @click="openWeb">打开一个外部网址</el-button>
        <el-button type="primary" @click="openDir">点击打开系统文件夹</el-button>
        <el-button type="primary" @click="beep">播放哔哔的声音</el-button>
        <el-button type="primary" @click="writeShortcutLink">创建快捷方式</el-button>
      </el-row>
      <el-row>
      </el-row>
    </el-card>
  </div>
</template>
<script>
import { shell } from 'electron'
import os from 'os'
export default {
  methods: {
    openDir () {
      shell.showItemInFolder(os.homedir())
    },
    openWeb () {
      shell.openExternal('https://element.eleme.cn/')
    },
    beep () {
      shell.beep()
    },
    writeShortcutLink () {
      shell.writeShortcutLink()
    }
  }
}
</script>
